package com.org.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.URL;

import java.time.LocalDateTime;

/**
 * ClassName: CommunityUser
 * Package: com.org.pojo
 * Description:
 *
 * @Author Origin
 * @Create 2024/2/3 0:03
 * @Version 1.0
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName("community_admin")
public class CommunityAdmin {

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id; //主键idA

    private Integer userType;   //账户类型  默认为 0

    private String username;    //用户名

//    @JsonIgnore //让springmvc把当前对象转换成json字符串的时候，忽略password，最终的json字符串中就灭有password这个属性了
    private String password;    //密码

    @URL
    private String userPic; //头像

    @URL
    private String communityProve;  //证明材料
    private String phone;   //电话号
    private Integer communityId;    //所在社区
    private String state;   //社区身份审核状态

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm")
    private LocalDateTime createTime;//创建时间

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm")
    private LocalDateTime updateTime;//更新时间
}
